package com.landcode.land.user.service.impl;

import com.landcode.land.user.dao.UserMapper;
import com.landcode.land.user.model.User;
import com.landcode.land.user.service.UserService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class UserServiceImpl implements UserService {

    @Resource
    private UserMapper userMapper;

    @Override
    public User getUser(long id) {
        return userMapper.selectById(id);
    }

    @Override
    public List<User> selectUserList() {
        return userMapper.selectUserList();
    }

    @Override
    public int addUser(User user) {
        return userMapper.insert(user);
    }
}
